package com.scrabbleMaster;

import java.util.List;

public class WordEvaluator {

	private TileRepository tileRepository;
	
	public WordEvaluator(TileRepository tileRepository) {
		this.tileRepository = tileRepository;
	}
	
	public Integer getPunctuation(String word) {
		List<Tile> tiles = tileRepository.getTilesFor(word);
		Integer value = 0;
		for (Tile tile : tiles) {
			value+=tile.getValue();
		}
		return value;
	}

}
